Whitelist & Tickets
CocoEOTW includes a ticket-based whitelist system that allows players to purchase entry to EOTW events.
How It Worksโ
- Players purchase tickets with in-game currency
- Only players with tickets can join during whitelist mode
- Tickets are stored in the database
- Admins can manually add/remove players
Configurationโ
settings:
whitelist:
enabled: true
max_tickets: -1 # -1 for unlimited
ticket_price: 1000
currency:
placeholder: "%vault_eco_balance%"
give_command: "eco give {player} {amount}"
take_command: "eco take {player} {amount}"
allow_decimals: true
Optionsโ
| Option | Description |
|---|---|
enabled | Enable/disable whitelist system |
max_tickets | Maximum tickets available (-1 = unlimited) |
ticket_price | Cost to purchase a ticket |
Currency Integrationโ
The plugin supports any economy through command-based integration:
currency:
placeholder: "%vault_eco_balance%" # Check balance
give_command: "eco give {player} {amount}"
take_command: "eco take {player} {amount}"
allow_decimals: true
Examples for different economies:
Vault/EssentialsXโ
placeholder: "%vault_eco_balance%"
give_command: "eco give {player} {amount}"
take_command: "eco take {player} {amount}"
PlayerPointsโ
placeholder: "%playerpoints_points%"
give_command: "points give {player} {amount}"
take_command: "points take {player} {amount}"
CoinsEngineโ
placeholder: "%coinsengine_balance_coins%"
give_command: "coins give {player} coins {amount}"
take_command: "coins take {player} coins {amount}"
Ticket GUIโ
Players can purchase tickets through a GUI. Configure in guis/whitelist.yml:
title: " &8แดกสษชแดแดสษชัแด แดษชแดแดแดแด"
size: 36
items:
buy_ticket:
material: "SKELETON_SKULL"
name: "�FFFFBuy Ticket"
slot: 13
lore:
- ""
- "&fIf you want to participate in"
- "&fthe EOTW event, buy this ticket."
- ""
- "&fTicket status: %cocoeotw_ticket_purchased%"
- ""
- "&eLeft-Click &6ยป &7Buy"
close:
slot: 31
material: BARRIER
name: "&#FF0000Close"
lore:
- ""
- "&fClose this menu"
- ""
- "&eLeft-Click &6ยป &7Close"
filler:
material: "BLACK_STAINED_GLASS_PANE"
name: " "
slots: [27, 28, 29, 30, 32, 33, 34, 35]
Commandsโ
Buy Ticketโ
/eotw ticket
Opens the ticket purchase GUI.
Whitelist Managementโ
/eotw whitelist add <player> # Add player
/eotw whitelist remove <player> # Remove player
/eotw whitelist list # List all players
/eotw whitelist reset # Clear whitelist
/eotw whitelist enable <true|false> # Toggle whitelist
Messagesโ
messages:
commands:
whitelist:
usage: "%prefix% &fUsage: /eotw whitelist <add|remove|reset|list|enable>"
already_purchased: "%prefix% &#FF0000You already have a ticket."
sold_out: "%prefix% &#FF0000Tickets are sold out."
insufficient_funds: "%prefix% &#FF0000You don't have enough money."
purchase_success: "%prefix% FB22Ticket purchased successfully!"
kicked_no_ticket: "%prefix% &#FF0000You don't have a ticket."
add:
usage: "%prefix% &fUsage: /eotw whitelist add <player>"
already_whitelisted: "%prefix% &f{player} is already whitelisted."
success: "%prefix% &f{player} has been added."
remove:
usage: "%prefix% &fUsage: /eotw whitelist remove <player>"
not_whitelisted: "%prefix% &f{player} is not whitelisted."
success: "%prefix% &f{player} has been removed."
reset:
success: "%prefix% FB22Whitelist has been reset."
list:
empty: "%prefix% &fWhitelist is empty."
success: "%prefix% &fWhitelisted: &#FBCD08{list}"
enable:
usage: "%prefix% &fUsage: /eotw whitelist enable <true|false>"
enabled: "%prefix% &fWhitelist FB22enabled."
disabled: "%prefix% &fWhitelist &#FF0000disabled."
Placeholderโ
Check if a player has purchased a ticket:
%cocoeotw_ticket_purchased%
Returns โ or โ based on configuration.